const express = require('express')
const webpack = require('webpack')
const webpackDevMiddleware = require('webpack-dev-middleware')

const app = express()

// webpack config
const config = require('./webpack.config.js')

const compiler = webpack(config)

app.use(webpackDevMiddleware(compiler))

app.listen(3000, () => {
  console.log('Listening on http://localhost:3000/')
})
